package com.example.dataresult;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.media.Image;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;

import javax.security.auth.login.LoginException;

public class VerifyActivity extends AppCompatActivity {

    private EditText etVerifyCode;
    private ImageView ivVerifyImg;
    private Button btnVerify;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_verify);
        etVerifyCode = findViewById(R.id.et_verify_code);
        ivVerifyImg = findViewById(R.id.iv_verify_img);
        btnVerify = findViewById(R.id.btn_verify);

        Intent intent = getIntent();
        Log.i("msg", "onClick: MainActivity传过来的数据："+ intent.getStringExtra("account"));
        Log.i("msg", "onClick: MainActivity传过来的数据："+intent.getStringExtra("password"));

        btnVerify.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent1 = new Intent();
                intent1.putExtra("result","登录成功");
                setResult(0,intent1);
                finish();
            }
        });
    }

    /**
     * 切换验证码图片
     * @param view
     */
    public void switchImg(View view) {
    }
}
